package com.newtouch.ainsurtech.service.demo;


import com.newtouch.ainsurtech.entity.demo.PersonEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * <p>
 * Title:
 * </p>
 * <p>
 * Description:
 * </p>
 * <p>
 * Copyright: Copyright (c) 2016
 * All rights reserved. 2017-09-26 19:31
 * </p>
 *
 * @author MaoJiaWei
 * @version 1.0
 */
public interface PersonEntityService {

    /**
     * 分页查询
     *
     * @param page
     * @return
     */
    public Page<PersonEntity> pagingBy(String name,Pageable page);

    /**
     * 保存
     *
     * @param object
     */
    void save(PersonEntity object);

    /**
     * 批量删除
     *
     * @param objectList
     */
    void delete(List<PersonEntity> objectList);

    /**
     * 删除
     *
     * @param object
     */
    void delete(PersonEntity object);

    /**
     * 根据主键删除
     *
     * @param id
     */
    void delete(Long id);

    /**
     * 更新
     *
     * @param object
     */
    void update(PersonEntity object);

    /**
     * 根据主键查询
     *
     * @param id
     * @return
     */
    PersonEntity get(Long id);
}
